﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HammerMUD.Commands;
using HammerMUD.NPC;
using HammerMUD.Rooms;

namespace HammerMUD.Admin
{
    public class MakeNpcCommand : Command
    {
        public MakeNpcCommand()
        {
            Name = "makenpc";
            Help = "makenpc <name>";
            SecurityLevel = SecurityLevel.Admin;
        }

        public override void Do(HammerMUD.System.User from, List<string> arguments)
        {
            if (arguments.Count == 1)
            {
                from.Send(Help);
                return;
            }

            Npc newNpc = new Npc();
            newNpc.CurrentRoom = from.UserAccount.CurrentCharacter.CurrentRoom;
            newNpc.Name = arguments[1];
            newNpc.CurrentRoom.Npcs.Add(newNpc);
            from.Send("You create " + newNpc.Name + " from nothing!");
            RoomUtilities.SendToRoom(from, from.UserAccount.CurrentCharacter.Name + " creates " + newNpc.Name + " from nothing!");
            return;
        }
    }
}
